//
//  XRRateView.h
//  XRmenu
//
//  Created by loufq on 11-11-23.
//  Copyright 2011年 foxhis. All rights reserved.
//

#import <UIKit/UIKit.h> 
@class XRRateView;

@protocol RateViewDelegate
-(void)rateView:(XRRateView *)rateView ratingDidChange:(float)rating;
@end

@interface XRRateView : UIView {
    UIImage *_notSelectedImage;
    UIImage *_halfSelectedImage;
    UIImage *_fullSelectedImage;
    float _rating;
    BOOL _editable;
    NSMutableArray *_imageViews;
    int _maxRating;
    int _midMargin;
    int _leftMargin;
    CGSize _minImageSize;
    id <RateViewDelegate> _delegate;
	
	//图像大小是否自己适应框
	BOOL fitToFrame;
}
@property (nonatomic, assign, getter=isFitToFrame) BOOL fitToFrame;

@property (retain) UIImage *notSelectedImage;
@property (retain) UIImage *halfSelectedImage;
@property (retain) UIImage *fullSelectedImage;
@property  float rating;
@property  BOOL editable;
@property  int maxRating;
@property (assign) id <RateViewDelegate> delegate;
@property  int leftMargin;
@property  int midMargin;

@end